home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 December
/
1984-12.d64
/
letter attack_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
104 lines
10 poke53280,2:poke 53281,1
20 hs=0:bt=9999:v=54296:s=54273:n=128:a=54272:b=1027:tab$=""
22 for i=atoa+24:pokei,0:next
25 poke 54277,100:poke 54278,100
30 print "[147]letter attack!"
50 fort=1to1000:next
100 print"[147]":sc=0:tm=0:poke 198,0
110 print ""tab$"choose difficulty"
120 print tab$"level (1[146] - 9[146])"
130 dl$="":get dl$:if dl$="" then 130
140 if dl$<"1" or dl$>"9" then 130
150 print tab$ dl$
160 dl=val(dl$):dl=10-dl:poke 198,0
170 print tab$"how many letters"
180 print tab$"would you like?"
190 print tab$"1[146]0 - 9[146]0"
200 nl$="":get nl$:if nl$="" then 200
210 if nl$<"1" or nl$>"9" then 200
220 print nl$
230 nl=val(nl$):nl=nl*10:lr=nl
270 print"[147]"
280 poke 55296,2:poke 1024,77:poke 55302,2:poke 1030,78
290 for i=1065 to 1945 step 40
300 poke i+a,2:poke i,101:poke i+a+4,2:poke i+4,103
310 next i
320 poke 56256,2:poke 1984,78:poke 56262,2:poke 1990,77
330 print "[144]difficulty"
340 print "level:"
350 print "";10-dl
360 print "letters"
370 print "remaining:"
380 print "";lr
390 print "score:"
400 print "high score:"
410 print "";hs
420 if bt<>9999 then poke bt+54269,4:poke bt-3,62
470 for i=55299 to 56259 step 40
480 poke i,6
490 next i
500 le=int(rnd(1)*26+1):lc=le+64
510 for j=1 to 26
520 poke b,j
530 fort=1to20:next
540 next j
550 for i=1 to le
560 poke b,i
570 next i
580 poke b,32:a$="":cn=0:pokev,15:poke 198,0
585 poke 54276,17
590 for i=1027 to 1988 step 40
600 poke s,220-cn
610 poke i,le
620 for j=1 to dl
630 if a$="" then get a$
640 next j
650 if a$="" then 680
660 if asc(a$)=lc then 820
670 a$=""
680 poke i,32
690 cn=cn+3
700 next i
710 poke 54276,16
720 fort=1to100:next
730 lr=lr-1
740 print " "
750 print "";lr
760 if lr=0 then 1010
770 goto 500
820 poke i+a+3,5:poke i+3,31:poke s,20:poke v,15:poke 54276,129
830 for k=1 to 30
840 poke i,81
850 fort=1to20:next
860 poke i,87
870 fort=1to20:next
880 next k
890 poke i,32:poke 54276,128
900 if i<bt then bt=i
910 tm=tm+(i-1026)/40:sc=sc+1:lr=lr-1
920 print " "
930 print "";lr
940 print "";sc
950 if lr=0 then 1010
960 goto 500
1010 fort=1to750:next
1020 print "[147]"tab$"score:";sc
1030 if sc>hs then hs=sc
1040 print tab$"high score:";hs
1050 print tab$"highest possible"
1060 print tab$"score:";nl
1070 er=(sc/nl)*100
1080 print tab$"efficiency"
1090 print tab$"rating:";er;"%"
1100 if sc=0 then at=0:goto 1120
1110 at=int(tm/sc)
1120 print tab$"average time:";at
1130 print tab$"(1[146] - good 22[146] -bad)"
1140 print tab$"would you like to"
1150 print tab$"play again? (y or n)"
1160 poke 198,0
1170 a$="":get a$:if a$="" then 1170
1180 if a$="y" then 100
1181 ifa$<>"n"then1170
1190 print"[147]":end